<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/WEB-INF/jsp/common/taglibs.jspf" %>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>登录</title>
<%@include file="/WEB-INF/jsp/common/import-css.jspf" %>
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->

<script type="text/javascript">
if(top != self) top.location.replace(location); 
</script>
</head>

<body class="logBG">
<div class=" container " style="width:700px;margin-top:8%;">
    <div class="loginToptime" > <img src="${ctx}/resource/images/time.png" class="img-responsive pull-left"> <span class="pull-left loginTime"><strong class="mR15">4000-609-891</strong>周一 ~ 周五 8:00~18:00</span> </div>
    <div class="login-panel panel panel-default">
      <div class="panel-body " > <div style="width:230px;height:95px;"><img src="${ctx}/resource/images/logo.png" class="img-responsive"></div>
        <div class="row pt15">
          <div class="col-md-3"></div>
          <div class="col-md-6">
           <c:if test="${not empty errorMsg}">
			<div class="ui-widget">
					<div class="ui-state-error ui-corner-all" style="padding: 0 .7em; margin-bottom:0.8em;">
						<span class="ui-icon ui-icon-alert" style="float: left; margin-right: .7em;"></span><strong>提示:</strong>${errorMsg}</span>
					</div>
			</div>
			</c:if>
            <form role="form" id="loginForm" method="post" action="${ctx}/admin/login" modelAttribute="loginBean">
              <fieldset>
                <div class="form-group pT20 ">
                  <div class="input-group" style="height:40px;">
                    <div class="input-group-addon"> <span class="glyphicon glyphicon-user"></span></div>
                    <input class="form-control validate[required,custom[onlyLetterNumber]" placeholder="用户名" name="username" type="user" autofocus style="height:40px;">
                  </div>
                  <div class="input-group pT20" style="height:40px;">
                    <div class="input-group-addon"> <span class="glyphicon glyphicon-lock"></span></div>
                    <input class="form-control validate[required]" placeholder="密码" name="password" type="password" style="height:40px;">
                  </div>
                </div>
<!--                 <label class="checkbox remember"><input type="checkbox" name="rememberMe" value="true">下次自动登录</label> -->
                <input type="submit" id="loginBtn" class="btn btn-primary btn-lg btn-block mT30 " value="登   录" style="border-bottom: 5px solid #346ea0;background:#4e93ce; font-weight:bold;" />
              </fieldset>
            </form>
          </div>
          <div class=" col-md-3"></div>
        </div>
        <div class="loginBottom "> 版权所有@ 2004-2015www.ctghr.com易才官网<br>
          公司地址：朝阳区建国路56号天洋运河壹号F1栋<br>
          京ICP备08102435号京公网安备110105006597 <br>
        </div>
      </div>
    </div>
  </div>


<%@include file="/WEB-INF/jsp/common/import-js.jspf" %>
<script type="text/javascript">
    $(function() {
    	$("#loginForm").validationEngine();
        $("#username").focus();
        $(".jcaptcha-btn").click(function() {
            var img = $(".jcaptcha-img");
            var imageSrc = img.attr("src");
            if(imageSrc.indexOf("?") > 0) {
                imageSrc = imageSrc.substr(0, imageSrc.indexOf("?"));
            }
            imageSrc = imageSrc + "?" + new Date().getTime();
            img.attr("src", imageSrc);
        });
        $.validationEngineLanguage.allRules.ajaxJcaptchaCall={
            "url": "${ctx}/jcaptcha-validate",
            "alertTextLoad": "* 正在验证，请稍等。。。"
        };
    });
    
    
</script>
</body>